package day7;

public class D7_4 {
    public static void main(String[] args) {
        Cat cat=new Cat();
        cat.SetColor("花色");
        cat.SetBreed("波斯猫");
        cat.GetColor();
        cat.GetBreed();
        cat.eat();
        cat.catchmouse();
        Dog dog=new Dog();
        dog.SetColor("黑色");
        dog.SetBreed("藏獒");
        dog.GetColor();
        dog.GetBreed();
        dog.eat();
        dog.work();
    }
}
class Cat{
    private String color;
    private String breed;
    public void SetColor(String color){
        this.color=color;
    }
    public String GetColor(){
        return color;
    }
    public void SetBreed(String breed){
        this.breed=breed;
    }
    public String GetBreed(){
        return breed;
    }
    public void eat(){
        System.out.println(color+"的"+breed+"正在吃鱼.....");
    }
    public void catchmouse(){
        System.out.println(color+"的"+breed+"正在逮老鼠.....");
    }
}
class Dog{
    private String color;
    private String breed;
    public void SetColor(String color){
        this.color=color;
    }
    public String GetColor(){
        return color;
    }
    public void SetBreed(String breed){
        this.breed=breed;
    }
    public String GetBreed(){
        return breed;
    }
    public void eat(){
        System.out.println(color+"的"+breed+"正在啃骨头.....");
    }
    public void work(){
        System.out.println(color+"的"+breed+"正在看家......");
    }
}